package com.lvtongka.app.base

import android.app.Application
import android.content.Intent
import com.lvtongka.app.helper.toast
import com.lvtongka.app.ui.login.LoginRevisionActivity
import com.lvtongka.app.ui.splash.SplashActivity

class BaseApplication : Application() {
    companion object {
        private lateinit var baseApplication: BaseApplication
        var longitude:String? = null
        var latitude:String? = null

        @JvmStatic
        fun getContext(): BaseApplication {
            return baseApplication
        }

        @JvmStatic
        fun jumpLogin() {
            getContext().startActivity(
                Intent(getContext(), LoginRevisionActivity::class.java).addFlags(
                    Intent.FLAG_ACTIVITY_CLEAR_TASK
                ).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            )
        }
    }

    override fun onCreate() {
        super.onCreate()
        baseApplication = this
    }
}